Image Exists
AutomatR.Windows.Activities.ImageExists
The "Image Exists" activity in AutomatR is part of the Windows activities package, providing the capability to verify whether an image is located within a specified UI element. This activity is useful for automating processes that require image recognition within the context of Windows applications.
Properties
Name | Description |
---|---|
Input | |
Region Selection | The name or path of the image file representing the region to be checked for existence. This image serves as a reference for the verification process. String variables containing the image file name or path. |
Adjust The Resolution | Adjusts the resolution of the image based on the current screen scaling. This can be helpful when dealing with different display resolutions. Boolean variables to control resolution adjustment. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Image Exists" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Example: 5 for a 5-second delay. |
Output | |
Result | Outputs a boolean value indicating whether the specified image was found within the designated UI element. True indicates the image exists, while False indicates otherwise. Variables of relevant types (e.g., Boolean variables) to store the result. |
How to use:
- Drag and drop the "Image Exists" activity onto the workflow.
- Configure the properties by specifying the region selection (image file name or path) for verification.
- Optionally, adjust the resolution based on the current screen scaling.
- Optionally, set a delay to wait before executing the activity.
- Execute the workflow to verify the existence of the specified image within the UI element.
Example: Consider an example where the "Image Exists" activity is used to check whether a specific button image exists within a Windows application:
Image Exists:
Region Selection: "ButtonImage.png"
Adjust The Resolution: True
Delay: 2
Result: isImageFound
In this example, the activity checks for the existence of the "ButtonImage.png" within the designated UI element, adjusts the resolution based on screen scaling, waits for 2 seconds before execution, and stores the result in the Boolean variable "isImageFound" for further workflow handling.
Note:
- It is crucial to provide the correct region selection, representing the image file used as a reference for verification.
- Adjusting the resolution is optional and depends on the specific requirements of the automation process.
- Consider setting an appropriate delay to handle synchronization issues or allow time for UI elements to load.